/*
 * @Author: weikang
 * @Description:
 * @Date: 2024-01-14 13:02:05
 * @LastEditTime: 2024-02-26 20:49:36
 * @FilePath: \env-manager-pc\src\views\document\device\detail\model\page.ts
 */
export type GPRS_MODULE = 1 | 2

export interface GPRS_QUERY {
  deviceObjID: string
  moduleID: GPRS_MODULE
}

export interface GPRS_CONFIG {
  APN: string
  UserName: string
  Pwd: string
  RePlay: number
  ReInterval: number
  IsEnable: boolean
}

export interface GPRS_SET extends GPRS_QUERY {
  config: GPRS_CONFIG
}

export interface DveiceVersion {
  SoftVer: string
  SoftDate: string
  HardVer: string
  HardDate: string
}
export interface GPRSVersion extends DveiceVersion {
  ICCID: string
  SIM: string
}

export interface BlueToothVersion extends DveiceVersion {
  ConnCurStatus: CurStatus
}

export enum CurStatus {
  PEDDING = 0,
  SUCCESS = 1,
  FAILED = 2,
}

export const blue_tooth_label = {
  [CurStatus.PEDDING]: '正在拨号',
  [CurStatus.SUCCESS]: '拨号成功',
  [CurStatus.FAILED]: '拨号失败',
}
export interface GPRS_STATUS {
  ConnCurStatus: CurStatus
  ConnCurStatusName: string
  ConnLastSuccTime: string
  ConnLastFailTime: string
  Signal: number
  IMEI: string
}

// 声明一个接口，继承了两个接口的所有参数
export interface GPRS_FORM extends GPRSVersion, GPRS_STATUS {
}

export interface DuiBi {
  TAIn: number
  TAOut: number
  TVIn: number
  TVOut: number
  WingWay: number
}

export interface UpdateRecord {
  UpCurStatus: number
  UpLastBeginTime: string
  UpLastEndTime: string
  UpBefourVer: string
  UpEndVer: string
}

export enum UpdateType {
  FTP = 0,
  Http = 1,
}
export interface UpdateData {
  deviceObjID: string
  upgradeType: UpdateType
  url: string
  upUser: string
  upPasswd: string
}
